<?php
class Form_model extends CI_Model {

    function __construct()     {
        parent::__construct();
    }

    public function username_check($username) {
        $this->db->where('username', $username);
        $query = $this->db->get('users');
        $res = FALSE;

        foreach ($query->result() as $row) {
            $res = TRUE;
        }
        return $res;
    }

}
?>
